<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>请假申请单</title>
	
	<link rel="stylesheet" type="text/css" href="css/jquery-ui-1.8.13.custom.css" />
	<link rel="stylesheet" type="text/css" href="css/jquery-ui-timepicker-addon.css"/>
	<script language="javascript" src="js/jquery-1.4.4.min.js"></script>
	<script language="javascript" src="js/jquery-ui-1.8.13.min.js"></script>
	<script language="javascript" src="js/jquery-ui-i18n.min.js"></script>
	<script language="javascript" src="js/jquery-ui-timepicker-addon.js"></script>
	<script language="javascript" src="js/WdatePicker.js"></script>
	
	
	<link rel="stylesheet" href="css/ui.validation.css" type="text/css"></link>
	<script type="text/javascript" src="Scripts/ui.validation.js?rand="></script>
	
	<script type="text/javascript">
		$(function(){
			loadDate();
			setValidate();
		});
		
		function setValidate(){
		    
	    	 $("#form").validatingForm({
	        	submitButtonId:"#btnSubmit",
	        	clearErrorsOnFocus:true,
	        	validateOnBlur:true,
	        	summaryTo:"#errorSummary"
	        });
	    }
		
		function loadDate() {
			// 初始化日期
			$("#startTime").datepicker({
					numberOfMonths: 1,
					onSelect: function(selectedDate) {}
			});
			
			$("#endTime").datepicker({
				numberOfMonths: 1,
				onSelect: function(selectedDate) {}
		});
			
		}
    </script>
    <style type="text/css">
	<!--
	body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
	}
	.STYLE19 {
		color: #344b50;
		font-size: 12px;
	}
	-->
</style>
</head>
<body>
<form action="addAbsenceOrder.action" method="post">
		<table id="form" width="60%" border="0" align="center" cellpadding="0" cellspacing="0">
			
			<tr><td colspan="4" height="31" align="center" bgcolor="#FFFFFF" class="STYLE19"><strong>请假申请单</strong></td></tr>
			<tr>
			<td height="25" align="center" bgcolor="#FFFFFF" class="STYLE19">请假标题：</td><td height="25" align="center" bgcolor="#FFFFFF" class="STYLE19"><input type="text" id="title" fieldName="请假标题" class="required-field" name="title"/></td>
			<td height="25" align="center" bgcolor="#FFFFFF" class="STYLE19">请假原因：</td>
			<td height="25" align="center" bgcolor="#FFFFFF" class="STYLE19"><input type="text" class="required-field" id="reason" name="reason" fieldName="请假原因"/></td>
			<tr>
			<td height="25" align="center" bgcolor="#FFFFFF" class="STYLE19">请假类型：</td><td height="25" align="center" bgcolor="#FFFFFF" class="STYLE19"><s:select list="absenceCategoryList" listKey="categoryId" listValue="categoryName" theme="simple" id="categorySelector" headerKey="-1" headerValue="-请选择-" cssClass="selectable-field" emptyValueMsg="请选择请假类型。" emptyValueForValidate="-1" name="categoryId"></s:select></td></tr>		
			<tr>
			<td height="25" align="center" bgcolor="#FFFFFF" class="STYLE19">起始日期：</td>
			<td height="25" align="center" bgcolor="#FFFFFF" class="STYLE19">
			<input type="text" id="startTime" class="NeedDate required-field" fieldName="起始日期" name="startTime" readonly="readonly"/>
			</td>
			<td height="25" align="center" bgcolor="#FFFFFF" class="STYLE19">结束日期：</td><td height="25" align="center" bgcolor="#FFFFFF" class="STYLE19"><input id="endTime" fieldName="结束日期" class="NeedDate required-field" readonly="readonly" type="text" name="endTime"/></td></tr>
			<tr>
			<td height="25" align="center" bgcolor="#FFFFFF" class="STYLE19">总计小时：</td><td height="25" align="center" bgcolor="#FFFFFF" class="STYLE19"><input type="text" fieldName="总计小时" id="totalHours" class="number-field required-field" name="totalHours"/></td>
			</tr>
			<tr><td colspan="4" height="25" align="center" bgcolor="#FFFFFF" class="STYLE19"><input type="submit" id="btnSubmit" value="添加" /></td></tr>
			<tr><td colspan="4" align="center"><div id="errorSummary" ></div></td></tr>
		</table>
	</form>
</body>
</html>